<div class="map-page">
    <div id="map"></div>
</div>
<h1 class="map-header"><%= link_to "Post Your Photo of Dylan's NYC Adventures", new_post_path %></h1>

<script>
  handler = Gmaps.build('Google');
  handler.buildMap({ provider: {}, internal: {id: 'map'}}, function(){
  markers = handler.addMarkers(<%=raw @hash.to_json %>);

  handler.bounds.extendWith(markers);
  handler.fitMapToBounds();
});

  google.maps.event.addListener(marker, 'mouseout', function(){
    infowindow.open(marker.get('map'), marker);
    });
</script>
